<!DOCTYPE html>
<!--suppress ThymeleafVariablesResolveInspection -->
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<head>
    <title>Login</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
    <link type="image/x-icon" href="../static/sysimg/favicon.ico" th:href="@{/sysimg/favicon.ico}" rel="shortcut icon"/>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap.min.css"
          th:href="@{/ext/bootstrap-4.6.0/css/bootstrap.css}" rel="stylesheet"/>
    <link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-icons/1.5.0/font/bootstrap-icons.min.css"
          th:href="@{/ext/bootstrap-icons/bootstrap-icons.css}" rel="stylesheet"/>
    <!--<link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-select/1.13.9/css/bootstrap-select.min.css" th:href="@{/ext/bootstrap-select-1.13.9/css/bootstrap-select.css}" rel="stylesheet"/>-->
    <!--<link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-switch/4.0.0-alpha.1/css/bootstrap-switch.min.css" th:href="@{/ext/bootstrap-switch-4.0.0/css/bootstrap-switch.min.css}" rel="stylesheet"/>-->
</head>
<body>
<div class="container-fluid">
    <div class="d-none">
        <input type="hidden" id="RootURL" th:value="${#request.contextPath}"/>
        <input type="hidden" id="SessionUserId" th:value="${#session?.getAttribute('userId')} ?: ''"/>
        <input type="hidden" id="Msg" th:value="${msg} ?: ''"/>
    </div>
    <div class="d-flex justify-content-center">
        <div class="card my-5 text-center" style="max-width: 540px;">
            <div class="row no-gutters">
                <div class="col-md-4">
                    <img class="img-fluid my-3 mx-2" src="../static/sysimg/logo.png" th:src="@{/sysimg/logo.png}"
                         alt="">
                    <h6>Welcome !</h6>
                </div>
                <div class="col-md-8">
                    <div class="card-body m-2">
                        <h6 class="card-title">Login</h6>
                        <small class="card-text text-danger" th:text="${msg} ?: '' "></small>
                        <form th:action="@{/doLogin}" method="POST" autocomplete="on" id="loginForm">
                            <input type="text" name="name" class="form-control" placeholder="UserName" />
                            <br>
                            <!--                            <input type="password" name="password" class="form-control" placeholder="Password">-->
                            <input type="password" name="passwordInput" class="form-control" placeholder="Password" />
                            <input type="hidden" name="password" />
                            <input type="hidden" name="lastUrl" th:value="${lastUrl} ?: ''"/>
                            <br>
                            <button id="subBtn" class="btn btn-outline-primary">Login</button>
                        </form>
                        <!--                        <div>-->
                        <!--                            <input type="text" name="name" class="form-control" placeholder="LoginName">-->
                        <!--                            <br>-->
                        <!--                            <input type="password" name="password" class="form-control" placeholder="Password">-->
                        <!--                            <br>-->
                        <!--                            <button id="subBtn" class="btn btn-outline-primary">Login</button>-->
                        <!--                        </div>-->
                        <p class="card-text my-2"><small class="text-muted">
                            <a class="card-link" th:href="@{/register}">Register</a></small>
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"
        th:src="@{/ext/jquery-3.5.1/jquery-3.5.1.js}"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.bundle.min.js"
        th:src="@{/ext/bootstrap-4.6.0/js/bootstrap.bundle.min.js}"></script>
<script src="../static/ext/layuiExt/layer-v3.5.1/layer/layer.js"
        th:src="@{/ext/layuiExt/layer-v3.5.1/layer/layer.js}"></script>
<script src="../../static/ext/md5-2.18.0/md5.min.js" th:src="@{/ext/md5-2.18.0/md5.min.js}"></script>
<script src="../static/js/actionTools.js" th:src="@{/js/actionTools.js}"></script>
<script src="../static/js/login.js" th:src="@{/js/login.js}"></script>
<script src="../../static/js/test.js" th:src="@{/js/test.js}"></script>
<script>
    // console.log("[[${users}]]");
    // var ctxPath = [[@{/}]];
    // console.log(ctxPath);
</script>

</body>
</html>